//
//  ZNWBComposeTypeView.swift
//  ZNWeibo
//
//  Created by FunctionMaker on 2017/8/29.
//  Copyright © 2017年 FunctionMaker. All rights reserved.
//

import UIKit

class ZNWBComposeTypeView: UIView {
    class func composeTypeView() -> ZNWBComposeTypeView{
        let nib = UINib(nibName: "ZNWBComposeTypeView", bundle: nil)
        let view = nib.instantiate(withOwner: nil, options: nil)[0] as! ZNWBComposeTypeView
        
        // 从XIB中加载出来的视图默认为600 * 600
        view.frame = UIScreen.main.bounds
        
        return view
    }
    
    func show() {
        guard let rootVC = UIApplication.shared.keyWindow?.rootViewController
        else {
            return
        }
        
        rootVC.view.addSubview(self)
    }
}
